﻿package {		import flash.display.*;	import flash.events.*;	import flash.text.TextField;		public class Preload extends MovieClip {				public function Preload() {			stop();			root.loaderInfo.addEventListener(ProgressEvent.PROGRESS, handleProgress);			root.loaderInfo.addEventListener(Event.COMPLETE, handleComplete);		}				public function handleProgress(e:ProgressEvent):void {			(getChildByName('loading') as TextField).text = Math.floor(e.bytesLoaded / e.bytesTotal * 100) + '%';		}				public function handleComplete(e:Event):void {			gotoAndStop(2);			root.removeEventListener(ProgressEvent.PROGRESS, handleProgress);			root.removeEventListener(Event.COMPLETE, handleComplete);		}	}}